package Java7_Concurrency_Cookbook.thread_synchronized_helper.semaphore;

public class Job implements Runnable {
    private PrintQueue printQueue;

    public Job(PrintQueue printQueue) {
        this.printQueue = printQueue;
    }

    @Override
    public void run() {
        String tName = Thread.currentThread().getName();
        System.out.println(tName + " : Going to print a job");
        printQueue.printJob(new Object());
        System.out.println(tName + " : The document has been printed");
    }
}
